home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - ProDOS
/
PRO001.dsk
/
FIN
/
ANNUITY.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
857b
|
26 lines
10 PRINT "FUTURE VALUE OF REGULAR DEPOSITS (ANNUITY)"
20 PRINT
29 REM - STATEMENTS 30 TO 100 REQUEST USER INPUT
30 PRINT "AMOUNT OF REGULAR DEPOSITS";
40 INPUT R
50 PRINT "NOMINAL INTEREST RATE";
60 INPUT I
70 PRINT "NUMBER OF DEPOSITS PER YEAR";
80 INPUT N
90 PRINT "NUMBER OF YEARS, MONTHS";
100 INPUT Y0,M
105 Y = Y0 +M/12
108 REM - CALCULATE INTEREST RATE PER DEPOSIT,
109 REM - CONVERT FROM PERCENT TO DECIMAL
110 I = I/100/N
119 REM - CALCULATE FUTURE VALUE BY FORMULA
120 T = R *((1 +I) ^(N *Y) -1)/I
129 REM - ROUND OFF TO NEAREST CENT, PRINT
130 PRINT "FUTURE VALUE = $"; INT(T *100 +.5)/100
139 REM - PRINT BLANK LINE TO SEPARATE DATA FROM QUESTION
140 PRINT
149 REM - RESTATE OR END PROGRAM? USER INPUT REQUIRED
150 PRINT "MORE DATA? (1=YES, 0=NO)";
160 INPUT X
170 IF X = 1 THEN 20
180 PRINT "<CTRL-D>RUN HELLO"